package com.zima.mall.controller;

import com.zima.mall.service.LoginService;
import com.zima.mall.vo.LoginVo;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;

@RestController
public class LoginController {

    @Resource
    private LoginService loginService;

    @RequestMapping("/login")
    public int login(@RequestBody LoginVo loginVo){
        return loginService.findByName(loginVo);
    }
}
